package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusinessActivityMapper;
import com.ruoyi.business.domain.BusinessActivity;
import com.ruoyi.business.service.IBusinessActivityService;
import com.ruoyi.common.core.text.Convert;

/**
 * 活动信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-15
 */
@Service
public class BusinessActivityServiceImpl implements IBusinessActivityService 
{
    @Autowired
    private BusinessActivityMapper businessActivityMapper;

    /**
     * 查询活动信息
     * 
     * @param activityId 活动信息主键
     * @return 活动信息
     */
    @Override
    public BusinessActivity selectBusinessActivityByActivityId(Long activityId)
    {
        return businessActivityMapper.selectBusinessActivityByActivityId(activityId);
    }

    /**
     * 查询活动信息列表
     * 
     * @param businessActivity 活动信息
     * @return 活动信息
     */
    @Override
    public List<BusinessActivity> selectBusinessActivityList(BusinessActivity businessActivity)
    {
        return businessActivityMapper.selectBusinessActivityList(businessActivity);
    }

    /**
     * 新增活动信息
     * 
     * @param businessActivity 活动信息
     * @return 结果
     */
    @Override
    public int insertBusinessActivity(BusinessActivity businessActivity)
    {
        return businessActivityMapper.insertBusinessActivity(businessActivity);
    }

    /**
     * 修改活动信息
     * 
     * @param businessActivity 活动信息
     * @return 结果
     */
    @Override
    public int updateBusinessActivity(BusinessActivity businessActivity)
    {
        return businessActivityMapper.updateBusinessActivity(businessActivity);
    }

    /**
     * 批量删除活动信息
     * 
     * @param activityIds 需要删除的活动信息主键
     * @return 结果
     */
    @Override
    public int deleteBusinessActivityByActivityIds(String activityIds)
    {
        return businessActivityMapper.deleteBusinessActivityByActivityIds(Convert.toStrArray(activityIds));
    }

    /**
     * 删除活动信息信息
     * 
     * @param activityId 活动信息主键
     * @return 结果
     */
    @Override
    public int deleteBusinessActivityByActivityId(Long activityId)
    {
        return businessActivityMapper.deleteBusinessActivityByActivityId(activityId);
    }
}
